<script lang="ts">
import { defineComponent, ref } from "vue";
//ui
//import { NConfigProvider, NInput, NDatePicker, NSpace } from "naive-ui";
// theme
//import {NButton } from "naive-ui";
// locale & dateLocale
//import { zhCN, dateZhCN } from 'naive-ui'

import router from "@router/index.js"; // 引入router
// 导入 Store， 使用自己的路径
import { useStore } from "@/store/store.js";
import axios from "axios";

export default defineComponent({

  setup() {
    const clickfn = () => {
      router.push({
        path: "/about",
        query: { id: 123, name: "abd" },
      });
    };
    const upmsg = () => {
      store.msg = "更新后的123";
    };
    const store = useStore();
    return {
      clickfn,
      upmsg,
      store,
    };
  },
});
</script>

<template>
  这里是主页
  <br />
  useStore:{{ store.id }}，{{ store.name }}，{{ store.token }}，{{ store.msg
  }}<n-button type="primary" @click="upmsg">改变</n-button>
  <br />
  <n-button type="primary" @click="clickfn">跳转</n-button>
</template>

<style>

</style>